﻿@model bugtracker.Models.UserList

@{
    ViewBag.Title = "List";
}

<h2>Contactlist</h2>

<table>
    <tr>
        <th>Username</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Email</th>
    </tr>

@foreach (var item in Model.UserProfiles) {
    <tr onmouseover="ChangeColor(this, true);" 
              onmouseout="ChangeColor(this, false);" 
              onclick="loadPartialView('/Stats/Index/@item.UserName', 'detailview');">
        <td>
            @Html.DisplayFor(u => item.UserName)
        </td>
        <td>
            @Html.DisplayFor(u => item.FirstName)
        </td>
        <td>
            @Html.DisplayFor(u => item.LastName)
        </td>
        <td>
            @Html.DisplayFor(u => Membership.GetUser(item.UserName).Email)
        </td>
    </tr>
}

</table>
